package com.example.membersteward.entity;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import lombok.Data;

/**
 * 订单表
 * @TableName order
 */
@Data
public class Order implements Serializable {
    /**
     * 订单id
     */
    @TableId(type = IdType.AUTO)
    @JsonSerialize(using = ToStringSerializer.class)
    private Long orderId;

    /**
     * 用户id
     */
    private Long userId;

    /**
     * 原金额
     */
    private BigDecimal origAmt;

    /**
     * 实际金额
     */
    private BigDecimal realAmt;

    /**
     * 折扣金额
     */
    private BigDecimal saleAmt;

    /**
     * 订单状态(WAIT-待支付，PAY-已付款，FINISH-已完成，REFUND-退款中，CANCEL-已取消)
     */
    private String status;

    /**
     * 创建时间
     */
    private Date createTime;

    /**
     * 最后更新时间
     */
    private Date lastUpdateTime;

    private static final long serialVersionUID = 1L;
}